/**
 * Created by Wayne
 * role Model
 */


const  mongoose = require('mongoose'),
    shortid = require('shortid'),
    Schema = mongoose.Schema;

let categorySchema = new Schema({
    _id: {
        type: String,
        'default': shortid.generate
    },
    catid:String,
    catname:String,
    cattype:String,
    caturl:String,
    parentid:String,
    keyword:String,
    catcomment:String,
    sortid:String,
    showflag:String,
    iconclass:String,
    iconcolor:String,
    iconurl:String,
    created_time:{
        type: Date,
        "default": Date.now
    }
});

let category = mongoose.model('category', categorySchema);

module.exports = category;
